package com.jinlejia.erp.bean;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/10/28 0028.
 */

public class WorkGuideBean implements Serializable {

    /**
     * exeNumber : 13512
     * workContent : 1，实收
     * 2，一样
     * supDeptName : 测试
     * userNameAndTelMap : [{"王岩7274":"13516237273"},{"马越":"13622127284"}]
     */

    private String exeNumber;
    private String workContent;
    private String supDeptName;
    private List<Map<String, String>> userNameAndTelMap;
    private List<String> userNameList;
    private List<String> userTelList;


    public String getExeNumber() {
        return exeNumber;
    }

    public void setExeNumber(String exeNumber) {
        this.exeNumber = exeNumber;
    }

    public String getWorkContent() {
        return workContent;
    }

    public void setWorkContent(String workContent) {
        this.workContent = workContent;
    }

    public String getSupDeptName() {
        return supDeptName;
    }

    public void setSupDeptName(String supDeptName) {
        this.supDeptName = supDeptName;
    }

    public List<Map<String, String>> getUserNameAndTelMap() {
        return userNameAndTelMap;
    }

    public void setUserNameAndTelMap(List<Map<String, String>> userNameAndTelMap) {
        this.userNameAndTelMap = userNameAndTelMap;
        userNameList = new ArrayList<>();
        userTelList = new ArrayList<>();
        for (int i = 0; i < userNameAndTelMap.size(); i++) {
            Map<String, String> map = userNameAndTelMap.get(i);
            if ( !TextUtils.isEmpty( map.keySet().toArray()[0].toString() ) ) {
                userNameList.add(map.keySet().toArray()[0].toString());
                userTelList.add(map.values().toArray()[0].toString());
            }
        }
    }

    public List<String> getUserNameList() {
        return userNameList;
    }

    public void setUserNameList(List<String> userNameList) {
        this.userNameList = userNameList;
    }

    public List<String> getUserTelList() {
        return userTelList;
    }

    public void setUserTelList(List<String> userTelList) {
        this.userTelList = userTelList;
    }

    @Override
    public String toString() {
        return "WorkGuideBean{" +
                "exeNumber='" + exeNumber + '\'' +
                ", workContent='" + workContent + '\'' +
                ", supDeptName='" + supDeptName + '\'' +
                ", userNameAndTelMap=" + userNameAndTelMap +
                ", userNameList=" + userNameList +
                ", userTelList=" + userTelList +
                '}';
    }
}
